[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
ERRORS
There are a number of conditions that can generate Toolkit errors,
e.g. you try to restore a screen that hasn't been saved, the maximum
number of saved screens has been exceeded etc. Whenever an error
occurs, the global byte variable W_Error is updated with the error
number (listed below).
The Toolkit can treat errors in one of two ways. If the global boolean
variable W_Fatal is set to true (default) then any error will be
fatal, i.e. an error message is displayed and the program halts. If
W_Fatal is set to false then the W_error variable is set but the
program continues (as best it can!) - be sure to check W_error after
every window call if W_Fatal is false. It is recommended that the
W_fatal flag be set to true until your programs are fully tested and
debugged.
The list of error codes for W_error are:
0 NO ERROR
1 MAX SCREENS EXCEEDED
2 MAX WINDOWS EXCEEDED
3 INSUFFICIENT MEMORY TO CREATE SCREEN
4 SCREEN NOT SAVED, CANNOT ACTIVATE
5 SCREEN HAS NOT BEEN CREATED, CANNOT ACTIVATE
6 SCREEN HAS NOT BEEN CREATED, CANNOT DISPOSE
7 SCREEN HAS NOT BEEN CREATED, CANNOT RESTORE
8 SCREEN DOES NOT EXIST CANNOT CLEAR
9 INSUFFICIENT MEMORY FOR SCREEN COPY/MOVE
10 VISIBLE SCREEN MUST BE ACTIVE FOR WINDOW OPERATIONS
11 VISIBLE SCREEN MUST BE ACTIVE FOR MESSAGE OPERATIONS
12 NOT EGA/VGA CANNOT SET CONDENSED MODE
Note: If the Toolkit fails with W_error 3, there is insufficient
memory available to store the screen. There are two probable causes:
- There really isn't enough memory! Try compiling the program to
disk and executing the EXE file, or check if there are any large
memory resident programs. In your program, check the available
memory with the Turbo function MaxAvail.
- The maximum heap available to the program has been set with the
compiler options or the $M compiler directive. Try increasing the
Max heap by 5000 bytes. The most common reasons for restricting a
programs heap size is if the program is going to be memory
resident or if it will call "child" programs with EXEC. In such
cases, carefully adjust the max heap setting with the $M
directive to optimize the amount of heap space needed.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson